<extend name="Index:index" />
    <block name="nav1">
        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a href="#">Admin</a>
            </li>
            <li class="active">新闻管理</li>
        </ul><!-- .breadcrumb -->
    </block>

    <block name="nav2">
        <h1>
        新闻管理
            <small>
                <i class="icon-double-angle-right"></i>
                新闻列表
            </small>
        </h1>
    </block>

    <block name="main">
        <div class="row">
            <div class="ddd">
                <a href="<{:U('News/index')}>"><b>全部新闻:</b></a> <<
                <a href="<{:U('News/snew')}>"><button class=" btn-primary">商学院新闻</button></a>
                <a href="<{:U('News/lnew')}>"><button class=" btn-success">轮播新闻</button></a>
                <a href="<{:U('News/cnew')}>"><button class=" btn-warning">成长计划</button></a>
            </div>
             <table class=" table-bordered h5 tb">
                <tr>
                    <th class="col-md-1">发布人</th>
                    <th class="col-md-2" style="text-align:center" colspan="2">新闻封面</th>
                    <th class="col-md-1">新闻标题</th>
                    <th class="col-md-1">发布时间</th>
                    <!-- <th class="col-md-3" style="text-align:center">新闻内容</th> -->
                    <th class="col-md-1">新闻所属分类</th>
                    <th class="col-md-1">访问量</th>
                    <th class="col-md-1">操作</th>
                </tr>

                <volist name="n_list" id="v">
                     <tr >
                    <!-- <td colspan="2"></td> -->
                    <td><span><{$v.name}></span></td>
                    <!-- <td style="display:none" class="awaw"><{$v.id}></td> -->
                    <td colspan="2"><img src="__PUBLIC__<{$v.cimg}>"></td>
                    <td><span><{$v.title}></span></td>
                    <td><span ><{$v.time}></span></td>
                    <!-- <td style="overflow:auto;"  class="tt"><{$v.article}></td> -->
                    <td>
                       <button class="btn btn-primary tu btn1">成长计划</button>
                    </td>
                    <td></td>
                    <td >
                    <div class="jj"></div>
                    <button class="btn btn-danger tu didi"  onclick="del(<{$v['id']}>,this)" >删除</button><br>

                    <a href="<{:U('News/n_reply',array('id'=>$v['id']))}>"><button class="btn btn-info tu">查看新闻内容</button></a>
                    </td>
                </tr>
               </volist>
            </table>
            <div class="pagelist"><{$page}></div>
        </div>

    <script src="__PUBLIC__/js/jquery-2.1.4.min.js"></script>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="__PUBLIC__/js/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="__PUBLIC__/js/bootstrap.min.js"></script>
    <!-- holder引用方法<img src="holder.js/250x250"> -->
    <script src="__PUBLIC__/js/holder.min.js"></script>


    <script>
     function del(id,obj){
            // var id = $('.awaw').html();
            // console.log(id);
             $.ajax({
                url:"<{:U('News/del')}>",
                type: 'post',
                data:{'id':id},
                dataType:'json',
                success:function(data){
                  // $('.img img.selected').remove();
                  // console.log(data);
                  $(obj).parent().parent().remove();
                  alert('删除成功!!');
                }
            })
        // alert('dasdsa');
       }

    </script>

    </block>
